import fetch from '@/utils/fetch';
//获取appID
export function getAppid(query) {
  return fetch({
    url: '/api/wxMpAuth/getAppid',
    method: 'get',
    params: query
  });
}
//code换token 
export function getWxMpAuth(query) {
  return fetch({
    url: '/api/wxMpAuth/authorization',
    method: 'get',
    params: query
  });
}

//授权接口
export function getToken(query) {
  return fetch({
    url: '/api/wxMpAuth/auth',
    method: 'get',
    params: query
  });
}

//个人中心/api/wxPerson
export function getwxPerson(query) {
  return fetch({
    url: '/api/wxPerson',
    method: 'get',
    params: query
  });
}

//获取短信验证码  
export function getSms(query) {
  return fetch({
    url: '/api/wxBindPhone/getSms',
    method: 'get',
    params: query
  });
}

//注册 
export function gettobind(obj) {
  return fetch({
    url: '/api/wxBindPhone/tobind',
    method: 'post',
    data: obj
  });
}

//首页
export function getHome(query) {
  return fetch({
    url: '/api/wxHome',
    method: 'get',
    params: query
  });
}

//商品列表
export function getGoodsList(query) {
  return fetch({
    url: 'http://www.hongxingchn.com:8081/users/trade_cart_list?id=2',
    method: 'get',
    params: query
  });
}

